public class Test {
    public static void main(String[] args) {
        System.out.println("100以内的素数有:");
        int j;
        for (int i = 2; i <=100; i++) {
            for (j=2; j <= i; j++) {
                if(i % j == 0){

                    break;
                }

            }

            if (j == i) {


                System.out.print(" "+i);

            }

        }

    }
}
